home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / rexx.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  2.4 KB  |  71 lines

  1. " Vim syntax file
  2. " Language:    Rexx
  3. " Maintainer:    Thomas Geulig <geulig@nentec.de>
  4. " Last change:    1998 Apr 2
  5.  
  6. " Remove any old syntax stuff hanging around
  7. syn clear
  8.  
  9. syn case ignore
  10.  
  11. " A bunch of useful Rexx keywords
  12. syn keyword rexxKeyword address arg begin break by call do drop echo else end
  13. syn keyword rexxKeyword exit forever function if interpret iterate leave nop
  14. syn keyword rexxKeyword module numeric off on options otherwise parse procedure
  15. syn keyword rexxKeyword pull push queue return say select shell signal then to
  16. syn keyword rexxKeyword trace until upper value var when with
  17.  
  18. syn keyword rexxTodo contained    TODO FIXME XXX
  19.  
  20. " String and Character constants
  21. " Highlight special characters (those which have a backslash) differently
  22. syn match rexxSpecial contained    "\\[0-7][0-7][0-7]\=\|\\."
  23. syn region rexxString        start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rexxSpecial
  24. syn region rexxString        start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=rexxSpecial
  25. syn match rexxCharacter        "'[^\\]'"
  26. syn match rexxSpecialCharacter    "'\\.'"
  27. syn match rexxSpecialCharacter    "'\\[0-7][0-7]'"
  28. syn match rexxSpecialCharacter    "'\\[0-7][0-7][0-7]'"
  29.  
  30. "catch errors caused by wrong parenthesis
  31. syn region rexxParen        transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxSpecial,rexxTodo,rexxUserLabel
  32. syn match rexxParenError    ")"
  33. syn match rexxInParen contained    "[{}]"
  34.  
  35. " Comments
  36. syn region rexxComment        start="/\*" end="\*/" contains=rexxTodo
  37. syn match rexxCommentError    "\*/"
  38.  
  39. " Highlight User Labels
  40. syn region rexxMulti    transparent start='?' end=':' contains=ALLBUT,rexxSpecial,rexxTodo,rexxUserLabel
  41. syn match rexxUserLabel    "\s*\I\i*\s*:$"
  42. syn match rexxUserLabel    ";\s*\I\i*\s*:$"ms=s+1
  43. syn match rexxUserLabel    "\s*\I\i*\s*:"me=e-1
  44. syn match rexxUserLabel    ";\s*\I\i*\s*:"ms=s+1,me=e-1
  45.  
  46. if !exists("rexx_minlines")
  47.   let rexx_minlines = 10
  48. endif
  49. exec "syn sync ccomment rexxComment minlines=" . rexx_minlines
  50.  
  51. if !exists("did_rexx_syntax_inits")
  52.   let did_rexx_syntax_inits = 1
  53.   " The default methods for highlighting.  Can be overridden later
  54.   hi link rexxUserLabel        Label
  55.   hi link rexxCharacter        Character
  56.   hi link rexxSpecialCharacter    rexxSpecial
  57.   hi link rexxParenError    rexxError
  58.   hi link rexxInParen        rexxError
  59.   hi link rexxCommentError    rexxError
  60.   hi link rexxError        Error
  61.   hi link rexxKeyword        Statement
  62.   hi link rexxString        String
  63.   hi link rexxComment        Comment
  64.   hi link rexxSpecial        SpecialChar
  65.   hi link rexxTodo        Todo
  66. endif
  67.  
  68. let b:current_syntax = "rexx"
  69.  
  70. " vim: ts=8
  71.